+2008-07-21 Michael Natterer <mitch@imendio.com>
+
+ * gtk/gtktoolbar.c (gtk_toolbar_class_init): use the simpler
+ g_signal_override_class_handler() instead of
+ g_signal_override_class_closure().
+
+ * gtk/gtktextview.c (gtk_text_view_class_init): ditto.
+
+ (gtk_text_view_compat_move_focus): chain up using
+ g_signal_chain_from_overridden_handler() instead of the generic
+ g_signal_chain_from_overridden() which needs manual fiddling with
+ millions of GValues.
+
2008-07-21 Michael Natterer <mitch@imendio.com>
* gtk/gtkuimanager.c: remove redundant include.
widget_class->expose_event = gtk_text_view_expose_event;
widget_class->focus = gtk_text_view_focus;
- /* need to override the base class function via override_class_closure,
+ /* need to override the base class function via override_class_handler,
* because the signal slot is not available in GtkWidgetCLass
*/
- g_signal_override_class_closure (g_signal_lookup ("move-focus",
- GTK_TYPE_WIDGET),
+ g_signal_override_class_handler ("move-focus",
GTK_TYPE_TEXT_VIEW,
- g_cclosure_new (G_CALLBACK (gtk_text_view_move_focus),
- NULL, NULL));
+ G_CALLBACK (gtk_text_view_move_focus));
widget_class->drag_begin = gtk_text_view_drag_begin;
widget_class->drag_end = gtk_text_view_drag_end;
{
/* if this is a signal emission, chain up */
- GValue instance_and_params[2] = { { 0, }, { 0, } };
- GValue return_value = { 0, };
-
- g_value_init (&instance_and_params[0], GTK_TYPE_WIDGET);
- g_value_set_object (&instance_and_params[0], text_view);
-
- g_value_init (&instance_and_params[1], GTK_TYPE_DIRECTION_TYPE);
- g_value_set_enum (&instance_and_params[1], direction_type);
-
- g_value_init (&return_value, G_TYPE_BOOLEAN);
-
- g_signal_chain_from_overridden (instance_and_params, &return_value);
+ gboolean retval;
- g_value_unset (&instance_and_params[0]);
- g_value_unset (&instance_and_params[1]);
- g_value_unset (&return_value);
+ g_signal_chain_from_overridden_handler (text_view,
+ direction_type, &retval);
}
else
{
widget_class->style_set = gtk_toolbar_style_set;
widget_class->focus = gtk_toolbar_focus;
- /* need to override the base class function via override_class_closure,
+ /* need to override the base class function via override_class_handler,
* because the signal slot is not available in GtkWidgetClass
*/
- g_signal_override_class_closure (g_signal_lookup ("move_focus",
- GTK_TYPE_WIDGET),
+ g_signal_override_class_handler ("move-focus",
GTK_TYPE_TOOLBAR,
- g_cclosure_new (G_CALLBACK (gtk_toolbar_move_focus),
- NULL, NULL));
+ G_CALLBACK (gtk_toolbar_move_focus));
widget_class->screen_changed = gtk_toolbar_screen_changed;
widget_class->realize = gtk_toolbar_realize;